#ifndef VISRE_H
#define VISRE_H

#define ROCE_DRV_MODULE_NAME  "vis_re"

struct vis_re {
    struct ib_device ibdev;
    struct net_device *ndev;
};

static inline struct vis_re *vis_get_dev_from_net(struct net_device *ndev)
{
    struct ib_device *ibdev = 
        ib_device_get_by_netdev(ndev, RDMA_DRIVER_RXE);

    if(!ibdev)
        return NULL;
    return container_of(ibdev, struct vis_re, ibdev);
}

#endif